﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Kortex.LedBulb
{
    public partial class opsCOntrolPanel : UserControl
    {
        public opsCOntrolPanel()
        {
            InitializeComponent();
            Init_toolTip();
        }

        private void Init_toolTip()
        {
            Power_tip.SetToolTip(power_Led, "Power Status");
            fan_tip.SetToolTip(fan_led, "Fan Status");
            Plug_tip.SetToolTip(plug_led, "Plug Status");
        }

        public void StartBlink(int milisecond, int which)
        {

            switch (which)
            {

                case 1:
                    power_Led.Blink(milisecond);
                    break;
                case 2:
                    fan_led.Blink(milisecond);
                    break;
                case 3:
                    plug_led.Blink(milisecond);
                    break;
            }
        }

        public void StopBlink(int which)
        {

            switch (which)
            {

                case 1:
                    power_Led.Blink(0);
                    break;
                case 2:
                    fan_led.Blink(0);
                    break;
                case 3:
                    plug_led.Blink(0);
                    break;
            }
        }

        public void SetToolTipTitle(string tiptile, int which)
        {

            switch (which)
            {

                case 1:
                    Power_tip.ToolTipTitle = tiptile;
                    break;
                case 2:
                    fan_tip.ToolTipTitle = tiptile;
                    break;
                case 3:
                    Plug_tip.ToolTipTitle = tiptile;

                    break;
              

            }
        }

        public void SetColor(Color col, int which)
        {

            switch (which)
            {

                case 1:
                    power_Led.Color = col;
                    break;
                case 2:
                    fan_led.Color = col;
                    break;
                case 3:
                    plug_led.Color = col;
                    break;
            }
        }






    }
}
